﻿using System.ComponentModel;
using System.Windows.Forms;
using FileSystemView.SelectedFsElements;

namespace HogoTools.Commit
{
	public class CommitDialog:Component
	{
		private string commitMessage;
		private SelectedFsElement selectedFsElement;

		public SelectedFsElement SelectedFsElement
		{
			get { return selectedFsElement; }
		}

		public string CommitMessage
		{
			get
			{
				return commitMessage;
			}
		}



		public DialogResult ShowDialog(SelectedFsElement selectedFsElement)
		{
			
			CommitForm dialogForm = new CommitForm();
			DialogResult dialogResult = dialogForm.ShowDialog();
			
			commitMessage = dialogForm.CommitMessage;
			this.selectedFsElement = selectedFsElement;

			return dialogResult;
		}

	}
}
